package com.atguigu.gmall.realtime.util;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @Author lzc
 * @Date 2022/4/20 9:09
 */
public class ThreadPoolUtil {
    public static ThreadPoolExecutor getThreadPool() {
        
        
        return new ThreadPoolExecutor(
            300,  //核心线程数
            500,  // 最大线程数
            60,
            TimeUnit.SECONDS,
            new LinkedBlockingQueue<>(100)
        );
    }
    
}
